<table id="availabilities" class="datatable table table-striped table-bordered">
  <thead>
    <tr>
      <th>(S) Rank Order</th>
      <th>Status</th>
      <th>Title</th>
      <th>Name</th>
      <th>Phone</th>
      <th>Dept</th>
      <th>Start time</th>
      <th>End Time</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
      <!-- Full available -->
    <% if availabilities %>
      <% availabilities.each do |a| %>
        <tr <%== availability_status_class(a, @event) %>>
          <td><%= Person::TITLE_ORDER[a.person.title] %></td>
          <td><%= link_to availability_status_label(a, @event), a %></td>
          <td><%= a.person.shortrank %></td>
          <td><%= link_to a.person.fullname, a.person %></td>
          <td><%= number_to_phone(a.person.phone) %></td>
          <td><%= "#{a.person.dept_shortname} #{a.person.division1}" %></td>
          <td><time><%= a.start_time.strftime('%a %b %d %k:%M') if a.start_time  %></time></td>
          <td><time><%= a.end_time.strftime('%a %b %d %k:%M') if a.end_time  %></time></td>
          <td><%= truncate(a.description, length: 24) %></td>
        </tr>
      <% end %>
    <% end %>
  </tbody>
</table>
